<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var str = 'a'
      //空字符串转换成boolean类型就是false，非空字符串就是true
      //在java或C#方面进行强制转换的类型中
      //String result=(int)parseInt.xxx
      //console.log(!!str)

      var n = null
      console.log(!!n)

      var s2 = undefined
      console.log(!!s2)

      //NaN是Number类型，代表着一个非数字
      var s3 = NaN
      console.log(!!s3)
    </script>
  </body>
</html>
